package com.dmzc.stage1.chapter6;

public class ThreadGroupCreator {
    public static void main(String[] args) {
        ThreadGroup mainGroup=Thread.currentThread().getThreadGroup();
        ThreadGroup group1=new ThreadGroup("Group1");
        System.out.println(group1.getParent()==mainGroup);
        ThreadGroup group2=new ThreadGroup(group1,"Group2");
        System.out.println(group2.getParent()==group1);

    }
}
